//
//  ServiceHomeViewController.h
//  HondaPro_2
//
//  Created by glendale on 13-6-9.
//  Copyright (c) 2013年 glendale. All rights reserved.
//

#import <UIKit/UIKit.h>

#import "HelpClass.h"

#import "popContentViewController.h"
#import "DDPopoverBackgroundView.h"
#import "VehicleDataEditViewController.h"

#import "checkOutViewController.h"

#import "SVProgressHUD.h"

@class repairHostoryView;

@interface ServiceHomeViewController : UIViewController <ContentViewControllerDelegate,UITableViewDataSource,UITableViewDelegate,UITextFieldDelegate>{
    

    NSDictionary *_dicJobSheetData;
    NSString *strCurrJobSheetId;
    NSString *jobCurrtState;
    NSString *_strCurrVin;
    NSString *currtPlateNamber;
    popContentViewController *contentCon;
    
    //维修车历的标志选中行标识
    NSInteger _mmJobSheetRowSel;
    NSInteger _mmHistoryRowSel;
    
    //表单分页
    NSInteger _from;
    NSInteger _to;
    NSMutableArray *_arrCarJobArrayAsyUpdate;
    
    /*
     派工标识
     _strDispatchFlag = @"mm_getJobMsgForDispatchingFlag"
     */
    NSString *_strDispatchFlag;
    
    /*
     新增作业单时得到的作业单号
     */
    NSString *_newJobSheetId;
}

/*
 识别从哪里跳转过来的
 @"from_work_board"\@"from_other"
 */
@property (strong,nonatomic) NSString *fromWhere;

@property(strong,nonatomic)VehicleDataEditViewController *vehicleDataEditViewController;

@property(strong, nonatomic)UIPopoverController *popCon;
@property(nonatomic) BOOL isHonda; //是否是oem
@property(strong, nonatomic) IBOutlet UITextField *plateNumber;
@property(strong, nonatomic) IBOutlet UITextField *vin;
@property(strong, nonatomic) IBOutlet UITextField *customerName;
@property(strong, nonatomic) IBOutlet UIButton *cartypeListBtn;
@property(strong, nonatomic) IBOutlet UIButton *carClassNameListBtn;
@property(strong, nonatomic) IBOutlet UIButton *joobStateListBtn;
@property(strong, nonatomic) IBOutlet UIButton *evaluatorPersonListBtn;
//车辆详情按钮
@property(strong, nonatomic)IBOutlet UIButton *carDetailedBtn;

@property (weak, nonatomic) IBOutlet UIButton *PrintBtn;
//
@property (nonatomic , assign) IBOutlet UITableView *carJobTableView;
@property (nonatomic , strong) NSMutableArray *carJobArray;//

@property (nonatomic)NSInteger currentRow;//当前作业单／车辆选择行


@property(assign,nonatomic)IBOutlet UIView *repairPanle;

@property(nonatomic ,strong)IBOutlet UILabel *messageLabel;//重要信息提示

@property(assign , nonatomic)IBOutlet UIButton *repairBtn;

@property(nonatomic , strong) repairHostoryView *hostoryView;//
@property (nonatomic , strong) NSMutableArray *historyArray;//

@property(nonatomic,strong)UIButton *HomeworkSingleNumber;//作业单制作新增按钮

//表单title的背景label
@property (strong, nonatomic) IBOutlet UILabel *tableViewTitleBgLbl;

//车型
@property(nonatomic , strong)NSMutableArray *carTypeArray;
@property(nonatomic , strong)NSString *carTypeId;
//车种
@property(nonatomic , strong)NSMutableArray *carClassArray;
@property(nonatomic , strong)NSString *carClassId;

//估价人
@property(nonatomic , strong)NSMutableArray *evaluatorPersonArray;
@property(nonatomic , strong)NSString *evaluatorPersonId;

//作业状态
@property(nonatomic , strong)NSMutableArray *stateArray;
@property(nonatomic , strong)NSString *stateCode;
//隶属店
@property(nonatomic , strong)NSMutableArray *shopArray;
@property(nonatomic , strong)NSString *shopIdId;


@property(nonatomic , strong)NSString *PrintType;

-(IBAction)backBntSelect:(id)sender;

-(IBAction)cartypeListBtn:(id)sender;//车型
-(IBAction)carClassNameListBtn:(id)sender;//车种名
-(IBAction)joobStateListBtn:(id)sender;//作业单状态
-(IBAction)evaluatorPersonListBtn:(id)sender;//估价人



//查询
-(IBAction)searchBtn:(id)sender;
//但选按钮
- (IBAction)isHondaSelect:(id)sender;


-(IBAction)outCheckBntSelect:(id)sender;
-(IBAction)fectionCheckBntSelect:(id)sender;


- (IBAction)carCalendarQueryBtnPressed:(UIButton *)sender;

-(void)showMessage:(NSString*) vin; //显示重要信息提示

-(IBAction)jobSheetMake:(id)sender;//作业单制作
- (IBAction)pritSselect:(id)sender;
- (IBAction)carCustomerSelect:(id)sender;

- (IBAction)partSearchSelect:(id)sender;
- (IBAction)addServiceSelect:(id)sender;
//创建标题
-(void)createTitle;

//刷新数据的方法
-(void)updateTheAsyCarJobTableView;

//零件预定按钮回调方法
- (IBAction)orderPartsBtnPressed:(UIButton *)sender;

//三包信息查询按钮的回调方法
- (IBAction)san_bao_BtnPressed:(UIButton *)sender;

//车辆详情回调方法
- (IBAction)carDetailedBtn:(id)sender;
//////////////新增用户需求
//1.完工检查
@property (strong, nonatomic) IBOutlet UIButton *wanGongJianChaBtn;
- (IBAction)wanGongJianChanBtn:(id)sender;
//2.中途离厂
@property (strong, nonatomic) IBOutlet UIButton *zhongTuLiChangBtn;
- (IBAction)zhongTuLiChangBtn:(id)sender;

/** 转接待传入参数 */
@property(nonatomic,strong)NSDictionary *turnServiceParam;


@end
